package com.ygqh.baby.mapper;
import com.ygqh.baby.po.AdminPermission;
import com.ygqh.baby.po.AdminRole;
import com.ygqh.baby.po.AdminUser;
import com.ygqh.baby.po.AdminUserExample;
import com.ygqh.baby.ao.QueryInfo;

import java.util.List;

import org.apache.ibatis.annotations.Param;
public interface AdminUserMapper {
    int countByExample(AdminUserExample example);

    int deleteByExample(AdminUserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AdminUser record);

    int insertSelective(AdminUser record);

    List<AdminUser> selectByExample(AdminUserExample example);

    AdminUser selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AdminUser record, @Param("example") AdminUserExample example);

    int updateByExample(@Param("record") AdminUser record, @Param("example") AdminUserExample example);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);
    
    int countSuper(@Param ("q") String q);
    
    List<AdminUser> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param ("q") String q);
    List<AdminPermission> findMenuByUser(@Param("userId") Long userId);
    List<AdminPermission> findPermissionByUser(@Param("userId") Long userId);

	List<AdminRole> findRolesByUser(@Param("userId") Long userId);
	int updateRoleStatusByUserId(@Param("userId") Long userId,@Param("status") String status);
}



